package bg.btanev.eightyfour.gwtfacade.converter;

import java.util.Collection;

import bg.btanev.eightyfour.domain.entitybase.Domain;
import bg.btanev.eightyfour.shared.dto.dtobase.DomainDto;

public interface DtoConverter {
	int DEFAULT_COPY_DEPTH = 1;

	<DTO extends DomainDto, D extends Domain> DTO domainToDto(D source);

	<DTO extends DomainDto, D extends Domain> DTO domainToDto(D source, int depth);

	<DTO extends DomainDto, D extends Domain> D dtoToDomain(DTO source);

	<DTO extends DomainDto, D extends Domain, CDTO extends Collection<DTO>, CD extends Collection<D>> CDTO collectionDomainToDto(
			CD sourceCollection, int depth);

	<DTO extends DomainDto, D extends Domain, CDTO extends Collection<DTO>, CD extends Collection<D>> CD collectionDtoToDomain(
			CDTO sourceCollection);
}
